#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr[4] = { 0,0,0,0};
	int i = 0;
	int j = 0;
	int middle = 0;
	scanf("%d %d %d %d", &arr[0], &arr[1], &arr[2], &arr[3]);
	for (i = 0; i < 4; i++)
	{
		for (j = 0; j < 4; j++)
		{
			if (arr[i] > arr[j])
			{
				middle = arr[i];
				arr[i] = arr[j];
				arr[j] = middle;
			}
		}
	}
	for (i = 0; i < 4; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}